#ifndef DIODE_H
#define DIODE_H
#include "project_header.h"

class diode
{
private:
    float V_TH;//开启电压
    float V_ON;//导通电压
    float V_BR;//反向击穿电压
    float V_D; //PN结两端电压
    float V_input;
    float V_output;
    float I_S; //反向饱和电流
    float I_D; //PN结两端电流

public:
    diode();
    void setV_TH(float);
    float getV_TH();
    void setV_ON(float);
    float getV_ON();
    void setV_BR(float);
    float getV_BR();
    void setV_D(float);
    float getV_D();
    void setV_input(float);
    float getV_input();
    void setV_output(float);
    float getV_output();
    void setI_S(float);
    float getI_S();
    void setI_D(float);
    float getI_D();
    float calI_D(float, float);

    void init_diode(float V_ON, float V_TH, float V_BR, float I_S);

};

#endif // DIODE_H
